/*
 * @Author: chenhuanhuan 2925102113@qq.com
 * @Date: 2024-03-13 15:54:54
 * @LastEditors: chenhuanhuan 2925102113@qq.com
 * @LastEditTime: 2024-11-26 15:57:39
 * @FilePath: \liuyanggui\src\main.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { createApp } from "vue";
import App from "./App.vue";
import router from "@/router";
import { setupStore } from "@/store";
import { setupDirective } from "@/directive";
import { useUserStore } from "@/store/modules/user";
import { setupRouterHooks } from "@/permission";
const userStore = useUserStore();
import "@/permission";

// 本地SVG图标
import "virtual:svg-icons-register";

// 国际化
import i18n from "@/lang/index";

// 样式
import "element-plus/theme-chalk/dark/css-vars.css";
import "@/styles/index.scss";
import "uno.css";

// 图片预览组件
import Viewer from "v-viewer";
import "viewerjs/dist/viewer.css";

const app = createApp(App);
// 全局注册 自定义指令(directive)
setupDirective(app);
// 全局注册 状态管理(store)
setupStore(app);

await setupRouterHooks();
app
  .use(router)
  .use(i18n)
  .use(Viewer, {
    defaultOptions: {
      // 需要配置的属性 注意属性并没有引号
      title: false,
      movable: false,
      navbar: false,
    },
  })
  .mount("#app");
